home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk58 / ifexists / readme < prev    next >
Text File  |  1995-03-19  |  2KB  |  57 lines

  1. ************************************************************************
  2. *
  3. *  June 1, 1987
  4. *
  5. *  IfExists.asm   Copyright 1987 Smythe and Realtime Associates
  6. *
  7. *  Usage:      IfExists <name>
  8. *
  9. *              where <name> is any valid AmigaDos Device, Directory
  10. *              or Filename.
  11. *
  12. *              Sets a return code of 20 if object is not found
  13. *              and returns a 0 is it is found.
  14. *
  15. *  IfExists corrects a problem with the IF EXISTS construct as used in
  16.    batch files or your startup-sequence.
  17.  
  18.    The problem was that if, for example, the line IF EXISTS DF3: were used
  19.    in the startup-sequence, and DF3: were not mounted, a requestor would
  20.    appear and the startup-sequence would stop and wait for a click on
  21.    Cancel.  This would not happen with directories, or files, only device
  22.    names.
  23.  
  24.    IfExists circumvents this by fooling the system while it goes looking
  25.    for its object.  My thanks to John V. Pope for the original idea for
  26.    this program and the original c source for this trick.
  27.  
  28.    A practical example, perhaps? (startup-sequence)
  29.  
  30.    Failat 25
  31.    IfExists My_Disk:
  32.       IF NOT ERROR
  33.           Copy My_Disk:stuff to Ram:
  34.       ENDIF
  35.  
  36.  
  37.    This, to me, is the nicest thing about IfExists, that you can call
  38.    a disk by name, and if it is not there, not get that damned requester.
  39.  
  40.    I have thoroughly tested this little goodie, and it seems to work as
  41.    professed, but you are using it at your own risk, not mine.
  42.  
  43.    This code may be distributed, hacked, bashed and abused as long as you
  44.    leave my name in it as original author( unless your hacks are REALLY
  45.    ugly) and you do not charge more than $5.00 for any disk on which you
  46.    distribute it.  Permission to distribute is also granted to those selling
  47.    disks for over $5.00 , but royalties of $0.50 per disk must be returned
  48.    to the author.(When PD becomes profit I want a piece of the action)
  49.  
  50.    Questions, praise, complaints, suggestions, money to:
  51.  
  52.    Tom Smythe
  53.    Real Time Associates
  54.    254 Ne.42nd
  55.    Seattle, WN.
  56.  
  57.